package com.mf.repository;

import com.mf.entity.OrderGoods;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * OrderGoods接口
 *
 * @author: Jiang Runqing
 * @date: 2018-09-10 22:05
 */
public interface OrderGoodsRepository extends JpaRepository<OrderGoods, Integer>, JpaSpecificationExecutor<OrderGoods> {

    @Query(value = "select * from t_order_goods where order_id = ?1", nativeQuery = true)
    List<OrderGoods> getListByOrderId(Integer orderId);
}